﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace theguineasyndrome
{
    public class WaterDrop : LiquidDrop
    {
        public const float LIFE_TIME = 2;

        public WaterDrop(Level level, Texture2D texture, Vector2 position, Vector2 speed, float lifeTime, int popTime)
            : base(level, texture, position, speed, lifeTime, popTime)
        {
            color = new Color(0.9f, 0.9f, 0.9f, 0.8f);

            float f = (1 - (1 - lifeTime / LIFE_TIME) * (1 - lifeTime / LIFE_TIME));

            size = new Vector2(texture.Width, texture.Height) * f;

            radius = (texture.Width + texture.Height) / 2 * f / 2 * 0.75f;

            rectangle.X = (int)position.X;
            rectangle.Y = (int)position.Y;
            rectangle.Width = (int)size.X;
            rectangle.Height = (int)size.Y;
            weight = 0.03f;
        }
    }
}
